<!-- 慎重提醒：在系统弹出的窗口（如dialog等）或对用户位置有特殊需求的页面中慎用此资源文件 -->
<%@ page language="java" import="java.util.*" isELIgnored="false" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String commonPath = request.getContextPath();
String commonBasePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+commonPath+"/";
%>
<script type="text/javascript" src="<%=commonBasePath%>resources/jquery/jquery-1.7.2.min.js"></script>
<!-- 设置公共参数 -->
<script type="text/javascript">
	var userVisit_menuTrace = "<s:property value='userMenuTrace' escape='false' />";
</script>
<!-- 用户访问菜单路径 -->
<script type="text/javascript" src="<%=commonBasePath%>resources/usertrace/uservisit-menutrace.js"></script>
<script type="text/javascript" src="<%=commonBasePath%>resources/layer/layer.js"></script>
<link rel="stylesheet" type="text/css" href="<%=commonBasePath%>resources/layer/skin/default/layer.css">
<!-- 表单校验 -->
<link rel="stylesheet" type="text/css" href="<%=commonBasePath%>resources/Validform_v5.3.2/css/valid-style.css" />
<script type="text/javascript" src="<%=commonBasePath%>resources/Validform_v5.3.2/js/Validform_v5.3.2_min.js"></script>

<!-- 下拉框搜索功能 -->
<link rel="stylesheet" type="text/css" href="<%=commonBasePath%>resources/select2/css/select2.min.css" />
<script type="text/javascript" src="<%=commonBasePath%>resources/select2/js/select2.js"></script>
<script type="text/javascript" src="<%=commonBasePath%>resources/select2/js/select2.min.js"></script>
<script type="text/javascript" src="<%=commonBasePath%>resources/select2/js/select2.full.js"></script>
<script type="text/javascript" src="<%=commonBasePath%>resources/select2/js/select2.full.min.js"></script>
<script type="text/javascript" src="<%=commonBasePath%>resources/select2/js/i18n/en.js"></script>
<!-- 时间控件 -->
<script type="text/javascript" src="<%=commonBasePath%>resources/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript">
$(window).load(function() {
	$("select").select2({
			language: {
				noResults : function() {
					return "Not found"
				},
				searching : function() {
					return "In the search…"
				}
			},
		    placeholder: "Please select",
		    allowClear: true
	});
	
});
// jQuery(document).ready(function(){
		
//   		$("select").select2({
//   		    placeholder: "请选择",
//   		    allowClear: true
//   		});
//   	});
 </script> 


<!-- showModalDialog的解决方案 -->
<script type="text/javascript">

function loadNewPage(path,name,height,width){
// 	"top=200,left=300,toolbar=no, location=yes, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes, width=760, height=230,modal=yes"
	if(height==null) height= 230;
	if(width==null) width= 760;
	if(window.showModalDialog==null){	
	     var iWidth=width;                          //弹出窗口的宽度;
         var iHeight=height;                         //弹出窗口的高度;
         //获得窗口的垂直位置
         var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
         //获得窗口的水平位置
         var iLeft = (window.screen.availWidth - 10 - iWidth) / 2; 
		var args = "top="+iTop+",left="+iLeft+",width="+width+",height="+height+",toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,modal=yes";
			window.open(path,name,args);
	}else{
		var args = "dialogWidth:"+width+"px;dialogHeight:"+height+"px;fullscreen:no;edge:sunken;center:yes;help:no;status:no";
		window.showModalDialog(path,window,args);	
	}
}
</script>

<script type="text/javascript">
// 使用layer实现
function loadNewModal(path,name,height,width){
	parent.layer.open({
		  type: 2,
		  title: name,
		  area: [width,height],
		  content: [path] //iframe的url，no代表不显示滚动条
		});
}
</script>